/* Start buttons global rules*/
// placeholder class  for extend in other classes
%ma-btn {
    // global rules for any btn link
    position: relative;
    overflow: hidden;
    display: inline-block;
    text-decoration: none;
    text-align: center;
    text-transform: capitalize;
    outline: none;
    border: 2px solid $transparent;
    border-radius: .25rem;
    padding: .625rem 3rem;
    font-size: 1rem;
    font-weight: 700;
    @include ma-box-shadow(0, 7, 10, -5, $transparent-black-25);
    @include ma-transition();
    cursor: pointer;
    z-index: 0;

    &:hover {
        text-decoration: none;
        // transform: translateY(-2px);
    }

    &:focus {
        outline: none !important;
    }
}

.ma-btn-primary {
    // extend the basic style of a btn
    @extend %ma-btn;
    // adding custom styles to this kind of btns
    border-color: $ma-main-color;
    color: $ma-white-color;
    background: $ma-main-color;



    &:hover {
        color: $ma-main-color;
        background: $transparent;
        border-color: $ma-main-color;

        &::before,
        &::after {

            #{$start-direction}: 100%;
            transform: rotate(-15deg) translateX(100% * $x-axe-direction);
        }

    }

    &::before,
    &::after {
        content: '';
        position: absolute;
        width: 30px;
        #{$start-direction}: 0;
        top: -50%;
        height: 200%;
        background-color: rgba($ma-white-color, .7);
        transform: rotate(-15deg) translateX(-150% * $x-axe-direction);
        z-index: -1;
        @include ma-transition();
    }


    &::after {

        transition-delay: .075s;
    }
}


.ma-btn-secondary {
    // extend the basic style of a btn
    @extend %ma-btn;
    /**/
    // adding custom styles to this kind of btns
    border: 2px solid;
    border-color: $ma-white-color;
    color: $ma-white-color;
    background: $transparent;

    &:hover {
        // background: $transparent-black-25;
        background: $ma-main-color;
        color: $ma-white-color;

        &::before,
        &::after {

            #{$start-direction}: 100%;
            transform: rotate(-15deg) translateX(100% * $x-axe-direction);
        }

    }

    &::before,
    &::after {
        content: '';
        position: absolute;
        width: 30px;
        #{$start-direction}: 0;
        top: -50%;
        height: 200%;
        background-color: rgba($ma-white-color, .7);
        transform: rotate(-15deg) translateX(-105% * $x-axe-direction);
        z-index: -1;
        @include ma-transition();
    }

    &::after {

        transition-delay: .065s;
    }
}



%play-btn {
    display: inline-block;

    .play-video-btn {
        display: flex;
        align-items: center;
        justify-content: center;

        &:hover {
            .play-btn-text::before {
                transform: scaleX(1);
            }
        }
    }

    .video-link {
        text-decoration: none !important;
    }

    .play-btn {
        position: relative;
        border-radius: 50%;
        padding: 5px;
        cursor: pointer;
        background: $transparent;
        @include ma-transition;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 3.5rem;
        height: 3.5rem;
        transform-origin: center;


        &:hover {
            transform: scale(1.05);
        }

        &::before {
            content: '';
            position: absolute;
            width: 100%;
            height: 100%;
            top: 0;
            left: 0;
            border-radius: 50%;
            background: $transparent;
            border: 2px solid $ma-white-color;
            animation: anim-pulses infinite 2s linear;
        }


        img.play-icon {
            width: 3rem;
            height: 3rem;
        }
    }

    .play-btn-text {
        position: relative;
        text-align: center;
        text-transform: capitalize;
        font-weight: 600;
        color: $ma-white-color;

        &::before {
            content: '';
            position: absolute;
            bottom: -.5rem;
            #{$start-direction}: 0;
            height: .25rem;
            width: 100%;
            border-radius: .25rem;
            transform: scaleX(0);
            transform-origin: center;
            @include ma-transition($duration: .3s);
            background: ($ma-white-color);
        }
    }
}

.play-btn-col-dir {
    // display: inline-block;
    // @include add-video-btn-styling();
    @extend %play-btn;

    .play-video-btn {
        flex-direction: column;
    }

    .play-btn {
        margin-bottom: .75rem;
    }
}

.play-btn-row-dir {
    // @include add-video-btn-styling();
    @extend %play-btn;

    .play-video-btn {
        flex-direction: row;
    }

    .play-btn {
        margin-#{$end-direction}: .75rem;
    }

}

// download from apple/google store buttons

.download-apps-area {

    @include ma-xs-screens {
        display: inline-flex;
        flex-direction: column;
    }


    .btn-store {
        min-width: 180px;

        &:not(:last-child) {
            margin-#{$end-direction}: 1rem;

            @include ma-xs-screens {
                margin-#{$end-direction}: 0;
                margin-bottom: 1rem;
            }
        }
    }

    .btn-app-store,
    .btn-google-play {
        display: inline-flex;
        align-items: center;
        padding: .5rem 1rem;
        border-radius: .25rem;
        text-decoration: none !important;
        @include ma-transition;

        .icon {
            font-size: 2rem;
            margin-#{$end-direction}: .75rem;
        }

        .title-wraper {
            line-height: 1;
            text-align: left;

            .sub-title {
                display: block;
                font-size: .75rem;
                font-weight: 400;
                text-transform: capitalize;
            }

            .title {
                display: block;
                font-size: 1.25rem;
                font-weight: 600;
                text-transform: capitalize;
            }
        }


        // classes for coloring app download buttons
        &.btn-transparent-bg {
            border: 2px solid $ma-white-color;
            background-color: $transparent;
            color: $ma-white-color !important;

            &:hover {

                background-color: rgba($ma-black-color, .5);
                border-color: $ma-white-color;
            }
        }

        &.btn-main-color-bg {
            border: 2px solid $ma-white-color;
            background-color: $ma-main-color;
            color: $ma-white-color !important;

            &:hover {

                background-color: $ma-white-color;
                color: $ma-main-color !important;
            }
        }

        &.btn-white-bg {
            border: 2px solid $ma-main-color;
            background-color: $ma-white-color;
            color: $ma-main-color !important;

            &:hover {

                background-color: $ma-main-color;
                color: $ma-white-color !important;
            }
        }

    }
}


body {
    &.rounded-btns {

        .ma-btn-primary,
        .ma-btn-secondary,
        .portfolio-btn {
            border-radius: 5rem;
        }
    }

    &.smooth-squared-btns {

        .ma-btn-primary,
        .ma-btn-secondary,
        .portfolio-btn {
            border-radius: .5rem;
        }
    }

    &.hard-squared-btns {

        .ma-btn-primary,
        .ma-btn-secondary,
        .portfolio-btn {
            border-radius: 0;
        }
    }
}

.ma-btn-squared {
    border-radius: .5rem !important;
}

.ma-btn-rounded {
    border-radius: 5rem !important;
}

/* End buttons global rules*/